/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						 combat_actor_model_cache.h

	$Header: /heroes4/combat_actor_model_cache.h $

	$NoKeywords: $

 ************************************************************************/

#if !defined( COMBAT_ACTOR_MODEL_CACHE_H_INCLUDED )
#define COMBAT_ACTOR_MODEL_CACHE_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <string>
#include <vector>
#include "cached_ptr.h"

class	t_combat_actor_model;
enum	t_creature_type;
enum	t_missile_type;
enum	t_town_type;

typedef t_cached_ptr<t_combat_actor_model> t_combat_actor_model_ptr;

class t_combat_actor_model_cache : public t_abstract_cache< t_combat_actor_model >
{
public:
	// Constructor/Destructor
	t_combat_actor_model_cache();
	t_combat_actor_model_cache( std::string const & name, double scale_ratio = 1.0 );
};

// ------------------------------------------------------------------------------
// object which handles a set of caches for different scales of the same model
// ------------------------------------------------------------------------------
class t_combat_actor_model_cache_set
{
public:
	t_combat_actor_model_cache_set( std::string const& name );

	t_combat_actor_model_ptr get( double scale );
protected:
	std::string								m_model_name;
	std::vector<t_combat_actor_model_cache> m_caches;
	std::vector<double>						m_scales;
};

// ------------------------------------------------------------------------------
// t_combat_actor_model_cache class
// ------------------------------------------------------------------------------

t_combat_actor_model_ptr get_combat_actor_model( t_creature_type creature, 
												 double			 scale_ratio = 1.0 );
t_combat_actor_model_ptr get_combat_actor_model( t_town_type alignment,
												 bool		 is_male,
												 bool		 has_archery,
												 bool		 is_spellcaster,
												 double		 scale_ratio = 1.0 );
t_combat_actor_model_ptr get_combat_actor_model( t_missile_type missile,
												 double         scale_ratio = 1.0 );
t_combat_actor_model_ptr get_adam_model( double scale_ratio );
t_combat_actor_model_ptr get_jack_model( double scale_ratio );


#endif // !defined( COMBAT_ACTOR_MODEL_CACHE_H_INCLUDED )
